Now that we had successfully produced magnetic field line paths, we automated the process. By starting a path at every third point around the edge of the simulation space, we were able to produce the magnetic field lines shown below very easily. The lines are produced on both ends of the magnets by allowing the paths to "bounce" at the boundary points (edge of simulation space and at the edge of the magnet).

auto_paths_onlyedge.png
Systematically generated magnetic field lines that touch the edge


Some areas outside the magnet were still empty, mostly on the sides of the magnet. These lines did not appear because they curve around and never reach the edge of the simulation space. Therefore, we improved the automation process by also starting paths at the edges of the magnet. With those modifications, we were able to produce the image below, which shows more field lines filling the entire space, even where empty before. However, the paths started a the edge of the magnet are not as evenly spaced.

auto_paths.png
Same field lines, plus some lines that don't touch the edge


With the image above, the magnetic field for the single-nanomagnet system is very clearly shown. The field lines provide a very more vivid picture of where the magnetic flux is going as compared to the contour plot or the vector field information given by the simulator's visualization.

auto_paths_quiver_zoom.png
Same field lines over vector field arrows (instead of contour plot) zoomed in


Later, we figured out how to lay the field lines over a vector field (instead of a contour plot). At the zoomed out level of the entire system, the arrows cannot been seen easily, so we included the above image that shows the vector field arrows and vector field lines at the top-left edge of the magnet. The edge of the magnet can be determined (roughly) by where the opposite facing arrows meet (at the bottom right of the image).